package ch2.el.event;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * 事件监听器
 */
@Component
public class DemoListener implements ApplicationListener<DemoEvent>{
    public void onApplicationEvent(DemoEvent event){
        String msg=event.getMsg();
        System.out.println("我(bean-demoListener)接收到了bean-demopulisher发布的消息"+msg);
    }
}
